package com.itheima.result;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result {
    private Integer code;
    private Object reuslt;
    private String err;
    public static Result ok(Object reuslt){

        return new Result(200,reuslt,null);
    }
    public static Result err(String err){

        return new Result(500,null,err);
    }
}
